package com.tedu;

import com.tedu.dao.UserDaoImpl;
import com.tedu.demo1.User;
import com.tedu.util.JDBCUtil;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

/**
 * Author：毕龙
 * Date: 2024/6/14 15:10
 */
public class TestConntion {
    public static void main(String[] args) throws SQLException {
        Connection conn = JDBCUtil.getConnection();
        System.out.println(conn);

        UserDaoImpl userDao = new UserDaoImpl();
        List<User> users = userDao.listUsers();
        users.forEach(System.out::println);
    }
}
